package com.wzxy.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wzxy.dao.IBaseDao;
import com.wzxy.service.IBaseService;


@Transactional
@Service("baseService")
public class BaseServiceImpl<T> implements IBaseService<T>{
	
	@Resource
	private IBaseDao<T> baseDao;

	@Override
	public void add(T t) {
		baseDao.add(t);
	}

	@Override
	public void delete(int id) {
		baseDao.delete(id);	
	}

	@Override
	public void update(T t) {
		baseDao.update(t);		
	}

	@Override
	public T load(int id) {
		return baseDao.load(id);
	}

	@Override
	public List<T> list(String hql, Object[] args) {
		return baseDao.list(hql, args);
	}
	
}
